package com.example.hotel.service.impl;



import com.example.hotel.dao.RoomtypeDao;
import com.example.hotel.entity.Roomtype;
import com.example.hotel.service.RoomtypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomtypeServiceImpl implements RoomtypeService {


    @Autowired
    private RoomtypeDao roomtypeDao;

    @Override
    public List<Roomtype> findAll() {
        return roomtypeDao.findAll();
    }

    @Override
    public int insert(Roomtype roomtype) {
        int result = roomtypeDao.insert(roomtype);
        return result;
    }

    @Override
    public int deleteById(int roomtypeId) {
        int result = roomtypeDao.deleteById(roomtypeId);
        return result;
    }

    @Override
    public int update(int roomtypeId, String roomtypeName, String capacity, String description) {
        int result = roomtypeDao.update(roomtypeId,roomtypeName,capacity,description);
        return result;
    }
}